﻿<%@ Page Language="C#" MasterPageFile="~/masterPage/admin/SAClient.master" AutoEventWireup="true" 

CodeFile="EditStandardFrm.aspx.cs"
    Inherits="SAClientWeb_EditStandardFrm" Title="标准管理---零件库" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<%--<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="listView_standardList">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="listView_standardList" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
       <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="listView_standardList">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadDockZone1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>--%>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" MinDisplayTime="0" />
<telerik:RadDockLayout ID="RadDockLayout1" runat="server">
   <table>
    <tr>
      <td valign="top" width="650px">
        <telerik:RadDockZone ID="RadDockZonen" runat="server" >
          <telerik:RadDock ID="RadDockn" runat="server" Title="标准列表"  Height="450px" DefaultCommands="None"
              BorderStyle="None" CloseText="关闭" CollapseText="收起" ExpandText="展开" DockHandle="None"
              Collapsed="false" Resizable="true" Pinned="true" EnableDrag="false">
            <ContentTemplate>
            <asp:ListView ID="listView_standardList" runat="server" DataKeyNames="StandardId" EnablePersistedSelection="false"
            onselectedindexchanged="listView_standardList_SelectedIndexChanged" AllowPaging="True" DataSourceID="standardList"> 
                    <ItemTemplate>
                        <tr style="background: #fff; font: 12px/16px segoe ui; line-height: 25px;"   onclick="<%#  

GetRowClickScript(Container) %>"> 
                            <td>
                                <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                            </td>
                            <td  style="width:60%;">
                                <asp:Label ID="DescriptionLabel" runat="server" Text='<%# 

SalePartial.Utility.Utils.StringTruncate(Eval("Description").ToString(), 20, "...") %>'></asp:Label>
                            </td>
                            <td style="display:none;">            
                             <asp:LinkButton ID="SelectButton" 
runat="server" Text="選択" CommandArgument='<%#Eval("Name")%>' OnClick="LbtnLink_Click"/></td>
                        </tr>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <tr style="background: #EDEDED; font: 12px/16px segoe ui; line-height: 25px;" onclick="<%# 

GetRowClickScript(Container) %>">  
                            <td>
                                <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>'></asp:Label>
                            </td>
                            <td  style="width:60%;" >
                                <asp:Label ID="DescriptionLabel" runat="server" Text='<%# 

SalePartial.Utility.Utils.StringTruncate(Eval("Description").ToString(), 20, "...") %>'></asp:Label>
                            </td>
                            <td style="display:none;">             
                            <asp:LinkButton ID="SelectButton" runat="server" Text="選択" CommandArgument='<%#Eval("Name")%>'  

OnClick="LbtnLink_Click"/>         
                            </td>
                        </tr>
                    </AlternatingItemTemplate>
                  
                    <EmptyDataTemplate>
                        <table id="Table1" runat="server" style="">
                            <tr>
                                <td>
                                    没有标准管理数据.
                                </td>
                            </tr>
                        </table>
                    </EmptyDataTemplate>
                    <LayoutTemplate>
                        <table id="Table2" runat="server" cellpadding="0" cellspacing="0" style="border: 1px solid #C3C3C3;
                            width: 100%;">
                            <tr id="Tr1" runat="server">
                                <td id="Td1" runat="server">
                                    <table id="itemPlaceholderContainer" runat="server" border="0" style="font: 12px/16px segoe 

ui;
                                        width: 100%;" cellspacing="0">
                                        <tr id="Tr2" runat="server" style="background: #EDEDED; line-height: 25px;">
                                            <th id="Th1" runat="server" style="text-align: left; font-weight: normal;">
                                                标 准 名 称
                                            </th>
                                            <th id="Th2" runat="server" style="text-align: left; font-weight: normal;">
                                                标 准 描 述
                                            </th>
                                        </tr>
                                        <tr id="itemPlaceholder" runat="server">
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tfoot>
                                <tr>
                                    <td colspan="5">
                                        <telerik:RadDataPager ID="RadDataPagerProducts" runat="server" 

PagedControlID="listView_standardList"
                                            PageSize="15" >
                                            <Fields>
                                                <telerik:RadDataPagerButtonField 

FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                                                <telerik:RadDataPagerButtonField 

FieldType="Numeric"></telerik:RadDataPagerButtonField>
                                                <telerik:RadDataPagerButtonField 

FieldType="NextLast"></telerik:RadDataPagerButtonField>
                                            </Fields>
                                        </telerik:RadDataPager>
                                    </td>
                                </tr>
                            </tfoot>
                        </table>
                    </LayoutTemplate>
                </asp:ListView>
                  <asp:HiddenField ID="hidStandardId" runat="server" />
            <asp:HiddenField ID="hideSts" runat="server" />
            </ContentTemplate>
         </telerik:RadDock>
       </telerik:RadDockZone>
      </td>
      <td valign="top" width="350px">
         <telerik:RadDockZone ID="RadDockZone1" runat="server">
          <telerik:RadDock ID="RadDock1" runat="server" Title="内容编辑" Height="450px" DefaultCommands="None"
              BorderStyle="None" CloseText="关闭" CollapseText="收起" ExpandText="展开" DockHandle="None"
              Collapsed="false" Resizable="true" Pinned="true" EnableDrag="false">
            <ContentTemplate>
                <p>标准名称：<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 

ControlToValidate="txtStandardName"
                                   ValidationGroup="Group1"    ErrorMessage="标准的名字不能为

空！"></asp:RequiredFieldValidator></p>
                <p><asp:TextBox ID="txtStandardName" runat="server" CssClass="txttitle" 
                Width="320px" Height="60px"></asp:TextBox>
        
                 </p>
                <p>标准描述： <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 

ControlToValidate="txtStandardDescription"
                                       ValidationGroup="Group1"    ErrorMessage="标准的描述不能为

空！"></asp:RequiredFieldValidator>
                 </p>
                <asp:TextBox ID="txtStandardDescription" runat="server" Height="250px" 
                Width="320px" TextMode="MultiLine"></asp:TextBox>
            </ContentTemplate>
          </telerik:RadDock>
        </telerik:RadDockZone>
      </td>
    </tr>
   </table>
    <div style=" text-align:center">
       <p><asp:Button ID="button_add" runat="server" Text="添  加"   ValidationGroup="Group1"
                onclick="button_add_Click" />
        <asp:Button ID="utton_modify" runat="server" Text="修  改"   ValidationGroup="Group1"
                onclick="button_modify_Click" />
        <asp:Button ID="button_delete" runat="server" Text="删  除" 
                onclick="button_delete_Click" />
          <%--  <asp:HiddenField ID="hidStandardId" runat="server" />
            <asp:HiddenField ID="hideSts" runat="server" />--%>
        </p>
     </div>
<asp:ObjectDataSource ID="standardList" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="GetAllStandards" TypeName="SalePartial.BLL.SABLL">
       
    </asp:ObjectDataSource>
    </telerik:RadDockLayout>
</asp:Content>